import { defineStore } from 'pinia'

export const useSettingsStore = defineStore('settings', {
  state: () => ({
    theme: 'light',
    showSettings: false,
    tagsView: true,
    fixedHeader: true,
    sidebarLogo: true,
    layout: 'left',
    title: 'OA System'
  }),

  actions: {
    changeSetting({ key, value }) {
      if (this.$state.hasOwnProperty(key)) {
        this[key] = value
      }
    }
  }
})